package com.sanyang.lawyer.service.Log;

import com.sanyang.lawyer.entity.Log_Table;
import com.sanyang.lawyer.mapper.Log.LogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @program: lawyer
 * @description: 日志的Service层
 * @author: Mr.Wang
 * @create: 2019-10-11 09:20
 **/

@Service
public class LogService {

    @Autowired
    private LogMapper logMapper;

    //查询全部
    public List<Log_Table> listall(int userId){
        return logMapper.listall(userId);
    }

    //查询全部
    public List<Log_Table> listall1(){
        return logMapper.listall1();
    }

    //根据id查询全部
    public Log_Table getbyid(int log_id){
        return logMapper.getbyid(log_id);
    }

    //模糊查询
    public List<Log_Table> fuzzyquery(Map<String,String> map){
        return logMapper.fuzzyquery(map);
    }

    //单个删除
    public void delete(int logId){
        this.logMapper.delete(logId);
    }

    public void update(Log_Table logTable){
        this.logMapper.update(logTable);
    }

    public void  insert(Log_Table logTable){
        this.logMapper.insert(logTable);
    }
}
